package com.bcu.calculus.controller;

import com.bcu.calculus.entity.CheckAttendance;
import com.bcu.calculus.entity.CheckAttendanceNumber;
import com.bcu.calculus.entity.Icon;
import com.bcu.calculus.entity.Message;
import com.bcu.calculus.service.CheckAttendanceService;
import com.bcu.calculus.service.IconService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "21 图标管理模块")
@RestController
@RequestMapping("/api/Icon")
public class IconController {

    @Resource
    private IconService iconService;

    @ApiOperation(value = "增加")
    @PostMapping(value = "/insertSelective")
    public Message<?> insertSelective(Icon icon) {
        return iconService.insertSelective(icon);
    }


    @ApiOperation(value = "删除")
    @PostMapping(value = "/deleteByPrimaryKey")
    public Message<?> deleteByPrimaryKey(String iconId) {
        return iconService.deleteByPrimaryKey(iconId);
    }


    @ApiOperation(value = "修改")
    @PutMapping(value = "/updateByPrimaryKeySelective")
    public Message updateByPrimaryKeySelective(Icon icon) {
        return iconService.updateByPrimaryKeySelective(icon);
    }


    @ApiOperation(value = "查所有")
    @GetMapping(value = "/selectAll")
    public Message<List<Icon>> selectAll(){
        return iconService.selectAll();
    }


    @ApiOperation(value = "关键字查询")
    @GetMapping(value = "/selectById")
    public Message<List<Icon>> selectById(String iconId){
        return iconService.selectById(iconId);
    }
}
